import request from '@/utils/request'

// 新增库存
export function addStockInfo(data) {
  return request({
    url: '/bookkeeping/stock/addStockInfo',
    method: 'post',
    data
  })
}

// 分页查询某一库存分类的库存信息
export function listStockInfoByLedger(data) {
  return request({
    url: '/bookkeeping/stock/listStockInfoByLedger',
    method: 'post',
    data
  })
}

// 增加减少库存
export function addStockRecord(data) {
  return request({
    url: '/bookkeeping/stock/addStockRecord',
    method: 'post',
    data
  })
}

// 获取出库入库记录
export function queryStockRecord(data) {
  return request({
    url: '/bookkeeping/stock/queryStockRecord',
    method: 'post',
    data
  })
}

// 修改库存详情
export function updateStockRecord(data) {
  return request({
    url: '/bookkeeping/stock/updateStockRecord',
    method: 'post',
    data
  })
}

// 删除库存详情
export function deleteStockRecord(data) {
  return request({
    url: '/bookkeeping/stock/deleteStockRecord',
    method: 'post',
    data
  })
}

// 库存下载打印
export function collectStockInfoByDirection(data) {
  return request({
    url: '/bookkeeping/stock/collectStockInfoByDirection',
    method: 'post',
    data
  })
}

// 固定资产下载打印
export function queryFixedAsset(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/queryFixedAsset',
    method: 'post',
    data
  })
}

// 经营利润下载打印
export function queryOperatingProfit(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/queryOperatingProfit',
    method: 'post',
    data
  })
}

// 总利润下载打印
export function queryAllProfit(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/queryAllProfit',
    method: 'post',
    data
  })
}

// 流水账下载打印
export function queryJournal(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/queryJournal',
    method: 'post',
    data
  })
}

// 收入下载打印
export function collectIncomeRecordByLedger(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/collectIncomeRecordByLedger',
    method: 'post',
    data
  })
}

// 支出下载打印
export function collectExpensesRecordByLedger(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/collectExpensesRecordByLedger',
    method: 'post',
    data
  })
}

// 获取经营利润列表
export function queryOperatingProfitRecordList(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/queryOperatingProfitRecordList',
    method: 'post',
    data
  })
}

// 获取总利润列表
export function queryAllProfitRecordList(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/queryAllProfitRecordList',
    method: 'post',
    data
  })
}

// 获取固定资产列表
export function queryFixedAssetRecord(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/queryFixedAssetRecord',
    method: 'post',
    data
  })
}

// 获取库存列表
export function webListStockInfoByLedger(data) {
  return request({
    url: '/bookkeeping/stock/webListStockInfoByLedger',
    method: 'post',
    data
  })
}

// 获取库存记录
export function webQueryStockRecord(data) {
  return request({
    url: '/bookkeeping/stock/webQueryStockRecord',
    method: 'post',
    data
  })
}

// 删除收入记录
export function deleteIncomeRecord(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/deleteIncomeRecord',
    method: 'post',
    data
  })
}

// 删除支出记录
export function deleteExpensesRecord(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/deleteExpensesRecord',
    method: 'post',
    data
  })
}

// 修改收入记录
export function updateIncomeRecord(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/updateIncomeRecord',
    method: 'post',
    data
  })
}

// 修改支出记录
export function updateExpensesRecord(data) {
  return request({
    url: '/bookkeeping/incomeExpenses/updateExpensesRecord',
    method: 'post',
    data
  })
}
